package Com.aop.demo;

import Com.aop.pojo.BankDaoImpl;
import Com.aop.pojo.bankServer;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallbackWithoutResult;
import org.springframework.transaction.support.TransactionTemplate;
import sun.dc.pr.PRError;

import javax.annotation.Resource;
import java.sql.SQLException;

/**
 * tx包就是Spring 的事务包
 *
 *
 * **/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationcontext.xml")
public class Text_Spring_tx {

  @Autowired
  private bankServer bankServer;
    @Test
    public void fun() throws SQLException {
     bankServer.Transfer("李四","张三",300);
    }
}
